In wireless communication represented by a wireless LAN complying with the IEEE802.11 standard series, there are many setting items to be set in advance. More specifically, the setting items include an SSID as a network identifier, an encryption method, an encryption key, an authentication method, and an authentication key. It is very troublesome for a user to set such communication parameters for wireless communication by manual input.
Various manufacturers have proposed automatic setting methods for easily setting communication parameters in a wireless communication apparatus. In those automatic setting methods, one communication apparatus provides another communication apparatus with communication parameters using a procedure predetermined between these connected communication apparatuses and a message, thereby automatically setting the communication parameters.
Japanese Patent Laid-Open No. 2006-311139 has disclosed an example of communication parameter automatic setting in communication in a wireless LAN ad hoc mode (to be referred to as ad hoc communication hereinafter). In addition, “Wi-Fi CERTIFIED for Wi-Fi Protected Setup Easing the User Experience for Home and Small Office Wi-Fi Networks” (see http://www.wi-fi.orgwp/wifi-protected) (to be referred to as “reference 1” hereinafter) has disclosed Wi-Fi Protected Setup (to be referred to as WPS) as a standard in the industry for communication parameter automatic setting between an access point (base station) and a station (terminal station). Furthermore, “Wi-Fi Protected Access Enhanced Security Implementation Based on IEEEP802.11i standard” (to be referred to as “reference 2” hereinafter) has disclosed Wi-Fi Protected Access (to be referred to as WPA) as a standard in the industry for, for example, an encryption method, an encryption key, an authentication method, and an authentication key in wireless communication.
If the roles of a communication apparatus for providing communication parameters (to be referred to as a provider hereinafter) and a communication apparatus for receiving the communication parameters (to be referred to as a receiver hereinafter) are determined in advance like WPS, the communication parameter transfer direction is uniquely determined.
However, if the roles of the provider and receiver are not determined in advance, it is impossible to uniquely determine the communication parameter transfer direction.
Furthermore, if a plurality of communication apparatuses become providers, a receiver cannot determine from which provider it should receive communication parameters.
In this case, user operability deteriorates when the user has to select one communication apparatus to be a provider and that to be a receiver.
The above problems may arise when a communication apparatus is newly added to a network already built between a plurality of communication apparatuses. In this case, it is desired that a communication apparatus belonging to the network becomes a provider, and the communication apparatus newly joining the network becomes a receiver to receive the communication parameters of the network. If, however, the roles of a provider and receiver are not determined in advance, it is impossible to set appropriate communication parameters in the communication apparatus newly joining the network.
The above problems may occur for not only communication parameters for wireless communication but also those for wired communication or the like which need to be set for communication between apparatuses.